<?php
require_once 'phpmoko/lib/common.php';

require_once 'phpmoko/ui/Form/FormBase.php';

class SubmitButton extends FormBase
{
	private $text = null;

	function __construct()
	{
		parent::__construct();
	}

	function setText($text)
	{
		$this->text = $text;
	}

	function toString()
	{
		$str = '<input';

		$str .= ' id="' . $this->id . '"';

		if ($this->name != null)
			$str .= ' name="' . $this->name . '"';

		if ($this->style != null)
			$str .= ' class="' . $this->style . '"';

		if ($this->text != null)
			$str .= ' value="' . $this->text . '"';

		$str .= ' type="submit">';

		return $str;
	}
}
?>